/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.prerecieve.entity;

import com.jeesite.modules.base.entity.fixedexpense.FixedExpense;
import com.jeesite.modules.base.entity.taccount.Taccount;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 预收款Entity
 * @author wsm
 * @version 2021-03-22
 */
@Table(name="t_advances_received_actual", alias="a", columns={
		@Column(name="advances_received_actual_id", attrName="advancesReceivedActualId", label="实际收款明细ID", isPK=true),
		@Column(name="frame_number", attrName="frameNumber", label="车架号"),
		@Column(name="advances_received_method", attrName="advancesReceivedMethod", label="收款方式"),
		@Column(name="advances_received_bank", attrName="advancesReceivedBank", label="收款银行"),
		@Column(name="actual_advances_received_amount", attrName="actualAdvancesReceivedAmount", label="实际预收款金额"),
		@Column(name="date", attrName="date", label="收款日期"),
		@Column(name="advances_received_type", attrName="advancesReceivedType", label="预收款类型"),
		@Column(name="create_by", attrName="createBy", label="创建者", isUpdate=false, isQuery=false),
		@Column(name="create_date", attrName="createDate", label="创建时间", isUpdate=false, isQuery=false),
		@Column(name="car_name", attrName="carName1", label="车辆名称"),
		@Column(name="row_number", attrName="rowNumber", label="行号"),
		@Column(name="advances_received_id", attrName="advancesReceivedId.advancesReceivedId", label="预收款ID"),
	}, joinTable={
		@JoinTable(type= JoinTable.Type.LEFT_JOIN, entity= FixedExpense.class, attrName="fixedExpense", alias="b",
				on="b.fixed_expense_id = a.advances_received_type", columns={
				@Column(name="fixed_expense_id", label="类型id", isPK=true),
				@Column(name="fixed_expense_name", label="类型名称"),
		}),
		@JoinTable(type= JoinTable.Type.LEFT_JOIN, entity= Taccount.class, attrName="taccount", alias="c",
				on="c.account_id = a.advances_received_bank", columns={
				@Column(name="account_id", label="银行id", isPK=true),
				@Column(name="account_name", label="银行名称"),
		})
}, orderBy="a.create_date ASC"
)
public class TadvancesReceivedActual extends DataEntity<TadvancesReceivedActual> {
	
	private static final long serialVersionUID = 1L;
	private String advancesReceivedActualId;		// 实际收款明细ID
	private String frameNumber;		// 车架号
	private String advancesReceivedMethod;		// 收款方式
	private String advancesReceivedBank;		// 收款银行
	private Double actualAdvancesReceivedAmount;		// 实际预收款金额
	private Date date;		// 收款日期
	private TadvancesReceived advancesReceivedId;		// 预收款ID 父类
	private String advancesReceivedType;
	private String advancesReceivedTypeName;
	private String carName1;//车辆名称
	private Long rowNumber;
	private FixedExpense fixedExpense;
	private String advancesReceivedBankName;
	private Taccount taccount;

	public Taccount getTaccount() {
		return taccount;
	}

	public void setTaccount(Taccount taccount) {
		this.taccount = taccount;
	}

	public String getAdvancesReceivedBankName() {
		return advancesReceivedBankName;
	}

	public void setAdvancesReceivedBankName(String advancesReceivedBankName) {
		this.advancesReceivedBankName = advancesReceivedBankName;
	}

	public FixedExpense getFixedExpense() {
		return fixedExpense;
	}

	public void setFixedExpense(FixedExpense fixedExpense) {
		this.fixedExpense = fixedExpense;
	}

	public TadvancesReceivedActual() {
		this(null);
	}

	public Long getRowNumber() {
		return rowNumber;
	}

	public void setRowNumber(Long rowNumber) {
		this.rowNumber = rowNumber;
	}

	public String getAdvancesReceivedTypeName() {
		return advancesReceivedTypeName;
	}

	public void setAdvancesReceivedTypeName(String advancesReceivedTypeName) {
		this.advancesReceivedTypeName = advancesReceivedTypeName;
	}

	public String getCarName1() {
		return carName1;
	}

	public void setCarName1(String carName1) {
		this.carName1 = carName1;
	}

	public String getAdvancesReceivedType() {
		return advancesReceivedType;
	}

	public void setAdvancesReceivedType(String advancesReceivedType) {
		this.advancesReceivedType = advancesReceivedType;
	}

	public TadvancesReceivedActual(TadvancesReceived advancesReceivedId){
		this.advancesReceivedId = advancesReceivedId;
	}
	
	public String getAdvancesReceivedActualId() {
		return advancesReceivedActualId;
	}

	public void setAdvancesReceivedActualId(String advancesReceivedActualId) {
		this.advancesReceivedActualId = advancesReceivedActualId;
	}
	
	@Length(min=0, max=100, message="车架号长度不能超过 100 个字符")
	public String getFrameNumber() {
		return frameNumber;
	}

	public void setFrameNumber(String frameNumber) {
		this.frameNumber = frameNumber;
	}
	
	@Length(min=0, max=2, message="收款方式长度不能超过 2 个字符")
	public String getAdvancesReceivedMethod() {
		return advancesReceivedMethod;
	}

	public void setAdvancesReceivedMethod(String advancesReceivedMethod) {
		this.advancesReceivedMethod = advancesReceivedMethod;
	}
	
	@Length(min=0, max=50, message="收款银行长度不能超过 50 个字符")
	public String getAdvancesReceivedBank() {
		return advancesReceivedBank;
	}

	public void setAdvancesReceivedBank(String advancesReceivedBank) {
		this.advancesReceivedBank = advancesReceivedBank;
	}
	
	public Double getActualAdvancesReceivedAmount() {
		return actualAdvancesReceivedAmount;
	}

	public void setActualAdvancesReceivedAmount(Double actualAdvancesReceivedAmount) {
		this.actualAdvancesReceivedAmount = actualAdvancesReceivedAmount;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}
	
	@Length(min=0, max=64, message="预收款ID长度不能超过 64 个字符")
	public TadvancesReceived getAdvancesReceivedId() {
		return advancesReceivedId;
	}

	public void setAdvancesReceivedId(TadvancesReceived advancesReceivedId) {
		this.advancesReceivedId = advancesReceivedId;
	}
	
}